import request from '@/utils/request'

// 渲染
export function getarticleListApi(params) {
  return request({
    url: '/content/article',
    method: 'get',
    params
  })
}
// 小区下拉框
export function getComListApi() {
  return request({
    url: '/community',
    method: 'get'
  })
}
// 回显
export function getarticleInfoApi(id) {
  return request({
    url: '/content/article/' + id,
    method: 'get'
  })
}
// 更改
export function editarticleApi(data) {
  return request({
    url: '/content/article/' + data.id,
    method: 'PUT',
    data
  })
}
// 添加
export function addarticleApi(data) {
  return request({
    url: '/content/article',
    method: 'post',
    data
  })
}
// 删除
export function delarticleApi(id) {
  return request({
    url: '/content/article/' + id,
    method: 'DELETE'
  })
}
